import axios from '@/libs/api.request'
import {
    postRequest,
    deleteRequest,
    getRequest,
    exportdedicated
} from '@/libs/axios'

export const getTableData = () => {
    return axios.request({
        url: 'get_table_data',
        method: 'get'
    })
}

export const getDragList = () => {
    return axios.request({
        url: 'get_drag_list',
        method: 'get'
    })
}

export const errorReq = () => {
    return axios.request({
        url: 'error_url',
        method: 'post'
    })
}

export const saveErrorLogger = info => {
    return axios.request({
        url: 'save_error_logger',
        data: info,
        method: 'post'
    })
}

export const uploadImg = formData => {
    return axios.request({
        url: 'image/upload',
        data: formData
    })
}


// 企业微信登录无企业微信账号注册并绑定获取绑定code
export const getRegisterCode = data => {
    return postRequest('/qywx/v1/getRegisterCode', data)
}


// 企业微信内部自动登录接口
export const qywxneibu = data => {
    return postRequest('/qywx/v1/login3rd', data)
}
// 获取企业微信config
export const getagentConfig = data => {
    return postRequest('/qywx/v1/jsapiticket/app', data)
}

// 菜单列表
export const getMenuList = data => {
    return postRequest('/zwgrid/v1/roles/menu-list', data)
}
// 登录
export const login = data => {
    return postRequest('/sys/v1/user/login', data, false)
}
//wx授权安装应用
export const wxAuth = data => {
    return getRequest('/qywx/v1/getAuthUrl', data)
}
//wx授权登录
export const wxlogin = data => {
    return postRequest('/qywx/v1/authorization', data)
}
// 扫码登录
export const goLogin = data => {
    return postRequest('/qywx/v1/scan/login', data)
}
// 验证密码-当前用户原始密码
export const oldPassword = data => {
    return postRequest('/sys/v1/check/currentUserPassword', data)
}
// 修改密码- 当前用户的密码
export const newPassword = data => {
    return postRequest('/sys/v1/update/currentUserPassword', data)
}
// 退出登录
export const islogOut = data => {
    return postRequest('/sys/v1/user/logout', data)
}


// 注册
export const enterpriseReRgister = data => {
    return postRequest('/sys/v1/org/registration', data)
}
// 发送验证码
export const sendCode = data => {
    return postRequest('/sms/v1/sendSmsCode', data)
}
// 验证码验证
export const smsSendSmsCode = data => {
    return postRequest('/sms/v1/smsVerify', data)
}

// 数据字典查询
export const dataDictionary = data => {
    return postRequest('/scrm/v1/data/dict', data)
}


// 动态表单组件转换里的
export const findSelectItemListByCategory = category => {
    return postRequest(`/admin/HCombox/selectItemList/${category}`)
}


// 找回密码
export const findPwd = data => {
    return postRequest('/sys/v1/forget/pwd', data)
}




// 工作台-社保数字统计
export const workhomeSheBao = data => {
    return postRequest('/zwgrid/v1/workhome/shebao', data)
}
// 工作台-医保数字统计
export const workhomeYiBao = data => {
    return postRequest('/zwgrid/v1/workhome/yibao', data)
}
// 工作台-社保-饼图统计
export const workhomeSpeedSheBao = data => {
    return postRequest('/zwgrid/v1/speed/shebao', data)
}
// 工作台-医保-饼图统计
export const workhomeSpeedYiBao = data => {
    return postRequest('/zwgrid/v1/speed/yibao', data)
}
// 工作台-社保-缴费排行
export const payRankSheBao = data => {
    return postRequest('/zwgrid/v1/shebao/area', data)
}
// 工作台-医保-缴费排行
export const payRankYiBao = data => {
    return postRequest('/zwgrid/v1/yibao/area', data)
}
// 工作台-快捷菜单
export const quickMenu = data => {
    return postRequest('/zwgrid/v1/roles/functionlistPC', data)
}
// 统计分析-社保-缴费统计
export const shebaolineMonth = data => {
    return postRequest('/zwgrid/v1/workhome/shebaoline', data)
}
// 统计分析-医保-缴费统计
export const yibaolineMonth = data => {
    return postRequest('/zwgrid/v1/workhome/yibaoline', data)
}

// 订单列表-医保
export const orderPageYiBao = data => {
    return postRequest('/order/v1/yibaoorder/page', data)
}
// 订单列表-社保
export const orderPageSheBao = data => {
    return postRequest('/order/v1/shebaoorder/page', data)
}
// 订单列表-退款订单-社保
export const orderPageTuiSheBao = data => {
    return postRequest('/order/v1/shebaotuidan/page', data)
}
// 订单列表-退款订单-医保
export const orderPageTuiYiBao = data => {
    return postRequest('/order/v1/yibaotuidan/page', data)
}
// 订单列表-新增
export const orderCreate = data => {
    return postRequest('/order/v1/create/order', data)
}
// 订单检查   检查是否有重复订单
export const orderCreateCheck = data => {
    return postRequest('/order/v1/create-order/check', data)
}


// 未缴费人员-社保-列表
export const queryForUnpaidInfo = data => {
    return postRequest('/zwgrid/v1/resident/queryForUnpaidInfo', data)
}
// 未缴费人员-医保-列表
export const queryForUnpaidInfoForYi = data => {
    return postRequest('/zwgrid/v1/resident/queryForUnpaidInfoForYi', data)
}

// 统计分析-数字统计-社保
export const statisticSheBao = data => {
    return postRequest('/zwgrid/v1/statistics/shebao', data)
}
// 统计分析-社保饼图
export const statisticSheBaoSpeed = data => {
    return postRequest('/zwgrid/v1/statistics/shebaospeed', data)
}

// 统计分析-数字统计-医保
export const statisticYiBao = data => {
    return postRequest('/zwgrid/v1/statistics/yibao', data)
}
// 统计分析-医保饼图
export const statisticYiBaoSpeed = data => {
    return postRequest('/zwgrid/v1/statistics/yibaospeed', data)
}


// 居民管理-列表
export const residentList = data => {
    return postRequest('/zwgrid/v1/get-resident/page', data)
}
// 居民管理-列表-新增
export const residentAdd = data => {
    return postRequest('/zwgrid/v1/add/resident', data)
}
// 居民管理-列表-详情
export const residentDetail = data => {
    return postRequest('/zwgrid/v1/get-resident/detail', data)
}
// 居民管理-列表-修改
export const residentUpdate = data => {
    return postRequest('/zwgrid/v1/update/resident', data)
}
// 居民管理-列表-删除
export const residentDel = data => {
    return postRequest('/zwgrid/v1/delete/resident', data)
}
// 居民管理-列表-快捷减员
export const residentQuickDelete = data => {
    return postRequest('/zwgrid/v1/add_resident/quick_delete', data)
}
// 居民管理-列表-快捷享受政策
export const residentQuickPolicy = data => {
    return postRequest('/zwgrid/v1/add_resident/quick_policy', data)
}
// 居民管理-列表-缴费订单
export const residentOrder = data => {
    return postRequest('/order/v1/order/for-resident', data)
}
// 居民管理-列表-操作日志
export const residentOperatingLog = data => {
    return postRequest('/zwgrid/v1/get-resident/operating-log', data)
}
// 参保人员-增员列表
export const addResidentList = data => {
    return postRequest('/zwgrid/v1/get-add-resident/page', data)
}
// 参保人员-增员-详情
export const addResidentDetail = data => {
    return postRequest('/zwgrid/v1/add_resident/add-detail', data)
}
// 参保人员-增员新增
export const addResidentAdd = data => {
    return postRequest('/zwgrid/v1/add_resident/resident_add', data)
}
// 参保人员-增员编辑
export const addResidentUpdate = data => {
    return postRequest('/zwgrid/v1/update/resident_add', data)
}
// 参保人员-增员-操作日志
export const addResidentOperatingLog = data => {
    return postRequest('/zwgrid/v1/get-add/log-audit', data)
}
// 参保人员-减员列表
export const subtractResidentList = data => {
    return postRequest('/zwgrid/v1/get-subtract-resident/page', data)
}
// 参保人员-减员-详情
export const subtractResidentDetail = data => {
    return postRequest('/zwgrid/v1/add_resident/delete-detail', data)
}
// 参保人员-减员新增
export const subtractResidentAdd = data => {
    return postRequest('/zwgrid/v1/add_resident/resident_delete', data)
}
// 参保人员-减员编辑
export const subtractResidentUpdate = data => {
    return postRequest('/zwgrid/v1/update/resident_delete', data)
}
// 参保人员-减员-操作日志
export const subtractResidentOperatingLog = data => {
    return postRequest('/zwgrid/v1/get-delete/log-audit', data)
}
// 参保人员-享受政策列表
export const policyResidentList = data => {
    return postRequest('/zwgrid/v1/get-policy-resident/page', data)
}
// 参保人员-享受政策-详情
export const policyResidentDetail = data => {
    return postRequest('/zwgrid/v1/add_policy/detail', data)
}
// 参保人员-享受政策新增
export const policyResidentAdd = data => {
    return postRequest('/zwgrid/v1/add_resident/policy', data)
}
// 参保人员-享受政策编辑
export const policyResidentUpdate = data => {
    return postRequest('/zwgrid/v1/update_resident/policy', data)
}
// 参保人员-享受政策-操作日志
export const policyResidentOperatingLog = data => {
    return postRequest('/zwgrid/v1/get-policy/log-audit', data)
}

// 导入进度条
export const importSchedule = data => {
    return postRequest('/data/import/get/import-schedule', data, false)
}
// 导入-因名字原因失败的数据
export const importErrorName = data => {
    return postRequest('/data/import/get-import/error-name', data, false)
}
// 导入- 因身份信息原因失败的数据
export const importErrorIdCard = data => {
    return postRequest('/data/import/get-import/error-idCard', data, false)
}

// 政策列表
export const policyList = data => {
    return postRequest('/zwgrid/v1/policy/page', data)
}
// 政策列表-详情
export const policyDetail = data => {
    return postRequest('/zwgrid/v1/policy/detail', data)
}
// 政策列表-新增
export const policyAdd = data => {
    return postRequest('/zwgrid/v1/add/policy', data)
}
// 政策列表-编辑
export const policyEdit = data => {
    return postRequest('/zwgrid/v1/update/policy', data)
}
// 政策列表-删除
export const policyDel = data => {
    return postRequest('/zwgrid/v1/delete/policy', data)
}
// 政策列表-批量删除
export const policyBatchDel = data => {
    return postRequest('/zwgrid/v1/batchdelte/policy', data)
}


// 系统设置-缴费设置
export const chargeList = data => {
    return postRequest('/zwgrid/v1/charge/page', data)
}
// 系统设置-标签列表
export const tagList = data => {
    return postRequest('/zwgrid/v1/tags/list', data)
}
// 系统设置-标签列表-添加
export const tagAdd = data => {
    return postRequest('/zwgrid/v1/add/tags', data)
}
// 系统设置-标签列表-编辑
export const tagEdit = data => {
    return postRequest('/zwgrid/v1/update/tags', data)
}
// 系统设置-标签列表-删除
export const tagDel = data => {
    return postRequest('/zwgrid/v1/delete/tags', data)
}

// 系统设置-组织结构-角色
export const departmentListRole = data => {
    return postRequest('/zwgrid/v1/departmentInfo/tree', data)
}
// 系统设置-通讯录-组织结构
export const departmentList = data => {
    return postRequest('/zwgrid/v1/departmentInfo/treeAll', data)
}
// 系统设置-通讯录-同步通讯录
export const addressbooks = data => {
    return postRequest('/zwgrid/v1/sync/addressbooks', data)
}
// 系统设置-通讯录-成员列表
export const departmentMemberList = data => {
    return postRequest('/zwgrid/v1/member/page', data)
}
// 系统设置-通讯录-编辑
export const userLoginUpdate = data => {
    return postRequest('/zwgrid/v1/user/userLoginUpdate', data)
}
// 系统设置-通讯录-区域管理
export const managementRegion = data => {
    return postRequest('/zwgrid/v1/init/managementRegion', data)
}
// 系统设置-通讯录-区域管理查看
export const managementRegionDetail = data => {
    return postRequest('/zwgrid/v1/init/managementRegionInfoForLogin', data)
}
// 系统默认角列表
export const roleslist = data => {
    return postRequest('/zwgrid/v1/roles/list', data)
}
// 审批流程设置左侧的流程列表
export const processlist = data => {
    return postRequest('/zwgrid/v1/process/list', data)
}
// 审批流程设置右侧的节点列表
export const nodelist = data => {
    return postRequest('/zwgrid/v1/process/nodelist', data)
}
// 功能权限列表数据
export const sysMenurole = data => {
    return postRequest('/zwgrid/v1/sysMenu/role', data)
}

//添加用户角色
export const addRole = data => {
    return postRequest('/zwgrid/v1/add/roles', data)
}

// 操作权限列表数据
export const roleLevelThree = data => {
    return postRequest('/zwgrid/v1/sysMenu/roleLevelThree', data)
}
// 修改功能权限和操作权限
export const sysMenu = data => {
    return postRequest('/zwgrid/v1/init/sysMenu', data)
}
// 审批流程 设置审批角色
export const auditroles = data => {
    return postRequest('/audit/v1/update/audit-roles', data)
}
// 标签设置 删除标签组
export const tagsGroup = data => {
    return postRequest('/zwgrid/v1/delete/tagsGroup', data)
}
// 退单接口
export const returnorder = data => {
    return postRequest('/qywx/v1/create/return-order', data)
}
// 获取审批权限
export const auditstatus = data => {
    return postRequest('/audit/v1/get/audit-status', data)
}
// 增员审核拒绝
export const pejectadd = data => {
    return postRequest('/audit/v1/audit/peject-add', data)
}
// 增员审核通过
export const passadd = data => {
    return postRequest('/audit/v1/audit/pass-add', data)
}
// 减员审核拒绝
export const pejectdelete = data => {
    return postRequest('/audit/v1/audit/peject-delete', data)
}
// 减员审核通过
export const passdelete = data => {
    return postRequest('/audit/v1/audit/pass-delete', data)
}
// 享受政策审核拒绝
export const pejectpolicy = data => {
    return postRequest('/audit/v1/audit/peject-policy', data)
}
// 享受政策审核通过
export const passpolicy = data => {
    return postRequest('/audit/v1/audit/pass-policy', data)
}
// 查询缴费信息
export const chargedetail = data => {
    return postRequest('/zwgrid/v1/charge/detail', data)
}
// 添加和修改缴费信息
export const saveorupdatecharge = data => {
    return postRequest('/zwgrid/v1/saveorupdate/charge', data)
}
// 编辑标签组
export const tagsgroup = data => {
    return postRequest('/zwgrid/v1/update/tagsgroup', data)
}
// 退款审批退款通过
export const auditreturnorder = data => {
    return postRequest('/audit/v1/audit/return-order', data)
}
// 退款审批退款驳回
export const pejectreturn = data => {
    return postRequest('/audit/v1/audit/peject-return', data)
}
// 政策列表置顶修改
export const istop = data => {
    return postRequest('/zwgrid/v1/set/istop', data)
}
// 退单列表退单详情退单日志
export const order_return = data => {
    return postRequest('/order/v1/order_return/log', data)
}
// 退款订单详情
export const orderdetail = data => {
    return postRequest('/order/v1/order/detail', data)
}
// 参保人员导出
export const getResidentExport = data => {
    return exportdedicated('/zwgrid/v1/resident/getResidentExport', data)
}
// 增员列表导出
export const addResidentExport = data => {
    return exportdedicated('/zwgrid/v1/resident/addResidentExport', data)
}
// 减员列表导出
export const deleteResidentExport = data => {
    return exportdedicated('/zwgrid/v1/resident/deleteResidentExport', data)
}
// 享受政策人员列表导出
export const policyResidentExport = data => {
    return exportdedicated('/zwgrid/v1/resident/policyResidentExport', data)
}
// 未缴费社保列表导出
export const queryForUnpaidInfoexport = data => {
    return exportdedicated('/zwgrid/v1/resident/queryForUnpaidInfoexport', data)
}
// 未缴费医保列表导出
export const queryForUnpaidInfoForYiExcel = data => {
    return exportdedicated('/zwgrid/v1/resident/queryForUnpaidInfoForYiExcel', data)
}
// 添加用户角色
export const addrole = data => {
    return postRequest('/zwgrid/v1/add/roles', data)
}
// 获取用户角色列表
export const getrole = data => {
    return postRequest('/zwgrid/v1/roles/list', data)
}
// 获取菜单列表
export const getmenuList = data => {
    return postRequest('/zwgrid/v1/menu/treelist', data)
}
// 修改用户角色的名称
export const amendUserRole = data => {
    return postRequest('/zwgrid/v1/update/roles', data)
}
// 编辑角色菜单
export const compileRoleMenu = data => {
    return postRequest('/zwgrid/v1/update/rolemenu', data)
}
// 组织结构列表
export const organizationStructureList = data => {
    return postRequest('/zwgrid/v1/depart/list', data)
}
// 添加部门成员
export const addDepartmentMember = data => {
    return postRequest('/zwgrid/v1/add/member', data)
}
// 用户登入
export const userLogin = data => {
    return postRequest('/zwgrid/v1/user/login', data)
}
// 成员列表
export const memberList = data => {
    return postRequest('/zwgrid/v1/member/page', data)
}
// 登入成功之后返回的路由信息
export const getRouter = data => {
    return postRequest('/zwgrid/v1/roles/menulist', data)
}
// 新闻列表
export const JournalismList = data => {
    return postRequest('/zwgrid/v1/news/pclist', data)
}
// 新增新闻列表
export const addJournalismList = data => {
    return postRequest('/zwgrid/v1/release/news', data)
}
// 新闻详情
export const journalismParticulars = data => {
    return postRequest('/zwgrid/v1/news/pcdetails', data)
}
// 编辑部门成员
export const compileDepartmentMember = data => {
    return postRequest('/zwgrid/v1/update/member', data)
}
// 获取机构列表
export const organizationList = data => {
    return postRequest('/zwgrid/v1/enterprise/page', data)
}
// 添加机构信息
export const addOrganizationMessage = data => {
    return postRequest('/zwgrid/v1/add/enterprise', data)
}
// 编辑机构信息
export const compileOrganizationMessage = data => {
    return postRequest('/zwgrid/v1/update/enterprise', data)
}
// 获取就业人员信息列表
export const getEmployedPersonList = data => {
    return postRequest('/zwgrid/v1/employedpersonnel/page', data) 
}
// 新增就业人员信息列表
export const addEmployedPersonList = data => {
    return postRequest('/zwgrid/v1/add/employedpersonnel', data)

}
// 获取标签列表
export const getTagList = data => {
    return postRequest('/zwgrid/v1/xctag/list', data)
}
// 获取删除人员列表
export const getRemoveList = data => {
    return postRequest('/zwgrid/v1/delete/employedpersonnelpage', data)
}
// 获取待审核人员列表
export const getStayAuditList = data => {
    return postRequest('/zwgrid/v1/audit/employedpersonnelpage', data)
}

